function pedia(){
    return this;
}
var controlFns = {
    index : function(){
        //var mSelf = this;
        //return mSelf.redirectTo('/user/login/', true);
        this.pediacontent();
    },
    pediacontent : function(){

        //var page = this.readData('page',this.req.__get, 0)||0;
        var php = {
            'pedialist' : 'store::/wiki/index'
        };
        var mSelf = this;
        this.setSDefault(php);
        this.bridgeMuch(php);
        this.listenOver(function(data){

            data.condition = this.req.__get;
            //console.log(data.condition);

            //data.groupPg = {};
            //data.groupPg.total_num = 2000;
            //data.groupPg.page_size = 10;
            //data.groupPg.current_page = page;

            data._CSSLinks = ['h5/css/pedia'];
            data._JSLinks  = ['h5/min/pedia'];
            data.pageTitle = '型百科';
            mSelf.render('pedia/pedia.html', data);
        });
    },
    filterbrand : function(args){

        //参数type_xx
        if(args){
            var type = args.split('_')[1];
        }

        var php = {
            'brandlist' : 'store::/wiki/options?type='+type,
            'fashionlist' : 'store::/wiki/list?type='+type
        };
        var mSelf = this;
        this.setSDefault(php);
        this.bridgeMuch(php);
        this.listenOver(function(data) {

            data.condition = this.req.__get;
            
            data.types = type;

            data._CSSLinks = ['h5/css/filterbrand'];
            data._JSLinks = ['h5/min/filterbrand'];
            data.pageTitle = '品牌';
            mSelf.render('pedia/filterbrand.html', data);
        });
    },

    pedia_apis: function(params){
        var php = {
            'pedialist' : 'store::/site/index',
            'otherbrand' : 'store::/wiki/list',
            'coverlist' : 'store::/wiki/info'
        };
        this.ajaxTo(php[params]);
    },
    encycovercontent : function(args){
        //type_id
        if(args){
            var type = args.split('_')[0];
            var id = args.split('_')[1];
        }
        var php = {
            'coverlist' : 'store::/wiki/info?type='+type +　'&id=' +　id,
            'viewlist' : 'store::/wiki/view?type='+type +　'&id=' +　id
        };
        var mSelf = this;
        this.setSDefault(php);
        this.bridgeMuch(php);
        this.listenOver(function(data){

            data.condition = this.req.__get;
            //console.log(data.condition);

            data.status = 'test';
            data.groupPg = {};
            data.groupPg.total_num = 2000;
            //data.groupPg.page_size = 10;
            //data.groupPg.current_page = page;

            data._CSSLinks = ['h5/css/encycover'];
            data._JSLinks  = ['h5/min/encycover'];
            data.pageTitle = '百科封面';
            mSelf.render('pedia/encycover.html', data);
        });
    }
};
exports.__create = controller.__create(pedia , controlFns);
